package com.timothy.business.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.timothy.business.model.ResultMessage;
import com.timothy.business.util.ResultMessageHelper;

@RestController
@RequestMapping("/privilege")
public class PrivilegeController {

	@RequiresPermissions("sys:log:list")
	@RequestMapping("/priv1")
	public ResultMessage<String> priv1() {
		return ResultMessageHelper.successResult("sys:log:list");
	}

    @RequiresPermissions("sys:log:list2")
    @RequestMapping("/priv2")
	public ResultMessage<String> priv2() {
        return ResultMessageHelper.successResult("sys:log:list2");
    }
}
